<!--
 * @Author: WangGuojian 1085844536@qq.com
 * @Date: 2024-06-27 14:02:37
 * @LastEditTime: 2024-06-27 14:11:19
 * @LastEditors: WangGuojian 1085844536@qq.com
 * @FilePath: \html\code\2_CSS\06_复合选择器\01_交集选择器.html
 * @Description:
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>交集选择器</title>
    <style>
        .rich {
            color: gold;
        }

        .beauty {
            color: red;
        }

        p.beauty {
            color: green;
        }

        .rich.beauty {
            color: orange;
        }
    </style>
</head>

<body>
    <h2 class="rich">土豪张三</h2>
    <h2 class="beauty">明星李四</h2>
    <h2 class="rich beauty">土豪明星王五</h2>
    <hr>
    <p class="beauty">小狗旺财</p>
    <p class="beauty">小猪佩奇</p>
</body>

</html>